package com.example.mybatisdemo.controller;

import com.example.mybatisdemo.dao.CarMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DemoController {

    @Autowired
    private CarMapper carMapper;

    @GetMapping("")
    @ResponseBody
    private Object index() {
        return carMapper.getAll();
    }
}
